package com.hy.controller;

import com.hy.service.impl.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @作用 移除所有题目接口
 */
@RestController
public class removeSequence {
    @Resource
    private SequenceServiceImpl sequenceService;
    @Resource
    private SequenceAdditionServiceImpl sequenceAdditionService;
    @Resource
    private SequenceDivisionServiceImpl sequenceDivisionService;
    @Resource
    private SequenceMultiplicationServiceImpl sequenceMultiplicationService;
    @Resource
    private SequenceSubtractionServiceImpl sequenceSubtractionService;

    /**
     * @作用 移除随机数据
     */
    @GetMapping("/removeAll")
    public String all() {
        sequenceService.truncate();
        return "success";
    }

    /**
     * @作用 移除加法数据
     */
    @GetMapping("/removeAddition")
    public String getAddition() {
        sequenceAdditionService.truncate();
        return "success";
    }

    /**
     * @作用 移除除法数据
     */
    @GetMapping("/removeDivision")
    public String getDivision() {
        sequenceDivisionService.truncate();
        return "success";
    }

    /**
     * @作用 移除乘法数据
     */
    @GetMapping("/removeMultiplication")
    public String getMultiplication() {
        sequenceMultiplicationService.truncate();
        return "success";
    }

    /**
     * @作用 移除减法数据
     */
    @GetMapping("/removeSubtraction")
    public String getSubtraction() {
        sequenceSubtractionService.truncate();
        return "success";
    }
}
